#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
int a[1000005];
inline int kd()
{
    int x=0,z=1;
    char c=getchar();
    while(c<'0'&&c>'9')
    {
        if(c=='-')
        {
            z=-1;
        }
        c=getchar();
    }
    while('0'<=c&&c<='9')
    {
        x*=10;
        x+=c;
        x-='0';
        c=getchar();
    }
    return x*z;
}
bool cmp(int x,int y)
{
    return x>y;
}
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>a[i];
    }
    sort(a+1,a+n+1,cmp);
    int l=n-1,r=n;
    while(l>=1)
    {
        l--;
        if(a[l]>a[r])
        {
            r--;
        }
    }
    cout<<r;
    return 0;
}
